package org.jvending.provisioning.config;

import junit.framework.TestCase;
import org.jvending.registry.RepositoryRegistry;

import java.io.FileNotFoundException;
import java.io.IOException;

public class BaseConfig extends TestCase {

    protected static String baseDir = System.getProperty("basedir");

    protected RepositoryRegistry repositoryRegistry;

    public void setUp() {
        repositoryRegistry = RepositoryRegistry.Factory.create();
        try {
            repositoryRegistry.loadFromFile(baseDir + "/src/test/resources/registry-config.xml");
        } catch (FileNotFoundException e) {
            e.printStackTrace();
            fail("Registry Config File not found");
        } catch (IOException e) {
            e.printStackTrace();
            fail("Registry Config File not found");
        }
    }
}
